import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'vant/lib/index.css';

import Tabble from './public/tabble/TabblePage.vue'
import Header from "@/public/header/HeaderPage.vue"
import { Button, Tabbar, TabbarItem, DropdownMenu, DropdownItem, NavBar, Field, CellGroup, Collapse, CollapseItem, Step, Steps, Divider, RadioGroup, Radio, List, PullRefresh, Cell, Form, ImagePreview, Toast } from "vant";
const vantUi = [
  Button, Tabbar, TabbarItem, DropdownMenu, DropdownItem, NavBar, Field, CellGroup, Collapse, CollapseItem, Step, Steps, Divider, RadioGroup, Radio, List, PullRefresh, Cell, Form, ImagePreview, Toast
]
for (const vant of vantUi) {
  Vue.use(vant)
}
import SignCanvas from "sign-canvas";
Vue.use(SignCanvas);
// import vueEsign from 'vue-esign'
// Vue.use(vueEsign);

//全局注册 main.js
Vue.component('TaBBle', Tabble)
Vue.component("Header", Header)
Vue.config.productionTip = false
// 全局的路由导航守卫

// router.beforeEach((to, from, next) => {

//   const isLoggedIn = checkUserLoggedIn(

//   ); // 根据实际情况判断用户是否已登录
//   if (to.path !== '/login' && !isLoggedIn) {
//     // 如果用户未登录且访问的不是登录页，则重定向到登录页
//     next('/login');
//   } else {
//     // 已登录或者访问的是登录页，则正常跳转
//     next();
//   }
// });

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
